<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="en">
<script src="${ctx}/static/healthassess/js/jquery-2.1.4.min.js"></script>
<script src="${ctx}/static/inspinia/js/plugins/layer/layer.js"></script>
<script src="${ctx}/static/h5/js/initRem.js"></script>
<head>
    <title>问卷</title>
    <%@ include file="/jsp/common.jsp"%>
    <link href="${ctx}/static/h5/css/base.css" rel="stylesheet">
    <link href="${ctx}/static/h5/css/q-style.css" rel="stylesheet">
</head>

<body class="bg-cf">
    <section class="ui-content">
        <div class="content-block padding-l-0 padding-r-0 padding-t-0 margin-b-0">
            <div class="questions-m">
                <div class="test-m">
                    <div id="Problem">
                        <h1>一、基本信息</h1>
                            <div class="text-info-list">
                                <section class="question-list-m q-list-w">
                                    <h3>1、性别</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="sex" <c:if test="${question.sex == 0}">checked="true"</c:if> value=""><span>男</span></li>
                                        <li><input class="i-checkbox" type="radio" name="sex" <c:if test="${question.sex == 1}">checked="true"</c:if> value=""  ><span>女</span></li>
                                    </ul>
                                </section>
                                <section class="question-list-m q-list-w">
                                    <h3>2、年龄</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="age" <c:if test="${question.age == 0}">checked="true"</c:if> value=""><span>18-25岁</span></li>
                                        <li><input class="i-checkbox" type="radio" name="age" <c:if test="${question.age == 1}">checked="true"</c:if> value=""><span>26-34岁</span></li>
                                        <li><input class="i-checkbox" type="radio" name="age" <c:if test="${question.age == 2}">checked="true"</c:if> value=""><span>35-45岁</span></li>
                                        <li><input class="i-checkbox" type="radio" name="age" <c:if test="${question.age == 3}">checked="true"</c:if> value=""><span>46-54岁</span></li>
                                        <li><input class="i-checkbox" type="radio" name="age" <c:if test="${question.age == 4}">checked="true"</c:if> value=""><span>>55岁</span></li>
                                    </ul>
                                </section>
                                <section class="question-list-m">
                                    <h3>3、身高(厘米)</h3>                        
                                     <ul><div class="input-w-box"><input class="" type="text"  value="${question.height}"/></div></ul>
                                </section>
                                <section class="question-list-m">
                                    <h3>4、体重(公斤)</h3>                        
                                    <ul><div class="input-w-box"><input class="" type="text"  value="${question.weight}"/></div></ul>
                                </section>
                            </div>
                        <h1>二、个人现状</h1>
                          <div class="text-info-list">
                             <section class="question-list-m">
                                    <h3>1、请在下列符合您现状的选项上打勾（可多选）</h3>                        
                                    <ul>
                                        <li><input class="i-more-checkbox" id="qx0" type="checkbox" value=""><span>缺乏运动</span></li>
                                        <li><input class="i-more-checkbox" id="qx1" type="checkbox"  value=""  ><span>熬夜</span></li>
                                        <li><input class="i-more-checkbox" id="qx2" type="checkbox" value=""><span>吸烟</span></li>
                                        <li><input class="i-more-checkbox" id="qx3" type="checkbox"  value=""  ><span>饮酒</span></li>
                                        <li><input class="i-more-checkbox" id="qx4" type="checkbox" value=""><span>味偏咸</span></li>
                                        <li><input class="i-more-checkbox" id="qx5" type="checkbox"  value=""  ><span>肥胖</span></li>
                                    </ul>
                              </section>
                              <section class="question-list-m">
                                    <h3>2、您经常参加体育锻炼吗？</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="dl" <c:if test="${question.dl == 0}">checked="true"</c:if> value=""><span>每天锻炼</span></li>
                                        <li><input class="i-checkbox" type="radio" name="dl" <c:if test="${question.dl == 1}">checked="true"</c:if> value=""><span>每周锻炼3-5天</span></li>
                                        <li><input class="i-checkbox" type="radio" name="dl" <c:if test="${question.dl == 2}">checked="true"</c:if> value=""><span>偶尔锻炼</span></li>
                                        <li><input class="i-checkbox" type="radio" name="dl" <c:if test="${question.dl == 3}">checked="true"</c:if> value=""><span>从不锻炼</span></li>
                                    </ul>
                              </section>
                              <section class="question-list-m">
                                    <h3>3、您认为您目前的身体状况是：</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="stzk" <c:if test="${question.stzk == 0}">checked="true"</c:if> value=""><span>健康</span></li>
                                        <li><input class="i-checkbox" type="radio" name="stzk" <c:if test="${question.stzk == 1}">checked="true"</c:if> value=""><span>亚健康</span></li>
                                        <li><input class="i-checkbox" type="radio" name="stzk" <c:if test="${question.stzk == 2}">checked="true"</c:if> value=""><span>怀疑患病</span></li>
                                        <li><input class="i-checkbox" type="radio" name="stzk" <c:if test="${question.stzk == 3}">checked="true"</c:if> value=""><span>患病</span></li>
                                    </ul>
                              </section>
                          </div>
                        <h1>三、健康企业创建意见与建议</h1>
                        <div class="text-info-list">
                            <section class="question-list-m">
                                    <h3>1、您喜欢的健康促进方式有：（可多选）</h3>                        
                                    <ul>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj0" value=""><span>健康讲座</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj1"  value=""  ><span>义诊咨询</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj2" value=""><span>健康教育折页</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj3"  value=""  ><span>版面巡展</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj4" value=""><span>流动健康驿站</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj5"  value=""  ><span>健康评比</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj6" value=""><span>微信发布</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="jkcj7" value=""><span>其他</span></li>
                                    </ul>
                            </section>
                            <section class="question-list-m">
                                    <h3>2、您最希望了解哪些知识？（可多选）</h3>                        
                                    <ul>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs0" value=""><span>职业安全</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs1"  value=""  ><span>疾病防治</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs2" value=""><span>健康合理饮食</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs3"  value=""  ><span>健康运动</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs4" value=""><span>妇女儿童保健</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs5"  value=""  ><span>中医养生</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs6" value=""><span>心理咨询</span></li>
                                        <li><input class="i-more-checkbox" type="checkbox" id="ljzs7" value=""><span>用药知识</span></li>
                                    </ul>
                            </section>
                            <section class="question-list-m">
                                    <h3>3、您希望多久开展一次健康促进活动？</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="jkzjhd" <c:if test="${question.jkzjhd == 0}">checked="true"</c:if> value=""><span>一月1次</span></li>
                                        <li><input class="i-checkbox" type="radio" name="jkzjhd" <c:if test="${question.jkzjhd == 1}">checked="true"</c:if> value=""><span>一季度1次</span></li>
                                        <li><input class="i-checkbox" type="radio" name="jkzjhd" <c:if test="${question.jkzjhd == 2}">checked="true"</c:if> value=""><span>半年1次</span></li>
                                        <li><input class="i-checkbox" type="radio" name="jkzjhd" <c:if test="${question.jkzjhd == 3}">checked="true"</c:if> value=""><span>其他</span></li>
                                    </ul>
                            </section>
                            <section class="question-list-m q-list-w">
                                    <h3>4、您对单位现阶段开展的健康促进活动是否满意：</h3>                        
                                    <ul>
                                        <li><input class="i-checkbox" type="radio" name="sfmy" <c:if test="${question.sfmy == 0}">checked="true"</c:if> value=""><span>非常满意</span></li>
                                        <li><input class="i-checkbox" type="radio" name="sfmy" <c:if test="${question.sfmy == 1}">checked="true"</c:if> value=""><span>比较满意</span></li>
                                        <li><input class="i-checkbox" type="radio" name="sfmy" <c:if test="${question.sfmy == 2}">checked="true"</c:if> value=""><span>不满意</span></li>
                                    </ul>
                            </section>
                            <section class="question-list-m">
                                    <h3>5、您对单位健康促进活动有什么意见和建议：</h3>                        
                                    <ul>
                                      <div class="input-w-box">
                                          <textarea rows="1">${question.yj}</textarea>
                                      </div>  
                                    </ul>
                            </section>
                        </div>
                    </div>
                    <p class="b-smg">谢谢您的支持与参与！</p>
                </div>
            </div>
           
        </div>
    </section>
    <script>
        $(document).ready(function() {
            var listone = ${list1};
            var listtwo =${list2};
            var listthree = ${list3};

            if(listone != undefined){
                for (var i = 0 ; i<listone.length ; i++){
                    $("input[id=qx"+listone[i]+"]").attr("checked", true);
//                    $("input[id=qx"+listone[i]+"]").parent().addClass("checked");
                }
            }

            if(listtwo != undefined) {
                for (var i = 0 ; i<listtwo.length ; i++){
                    $("input[id=jkcj"+listtwo[i]+"]").attr("checked", true);
//                    $("input[id=jkcj"+listtwo[i]+"]").parent().addClass("checked");
                }
            }
            if(listthree != undefined) {
                for (var i = 0 ; i<listthree.length ; i++){
                    $("input[id=ljzs"+listthree[i]+"]").attr("checked", true);
//                    $("input[id=ljzs"+listthree[i]+"]").parent().addClass("checked");
                }
            }

        });

//        function gbclose() {
//            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
//            parent.layer.close(index); //再执行关闭
//        }
    </script>
</body>

</html>